<template>
  <s-dialog :dialog="dialogSearch" :closeTip="false">
    <el-steps :space="175"
              direction="vertical"
              :active="dialogSearch.step.length">
      <el-step :title="item.operatorTime"
               v-for="item in dialogSearch.step"
               :key="item.operatorTime">
        <div slot="description">
          <p>操作人员: {{item.operatorName}}</p>
          <p>节点名称: {{item.bxNodeName}}</p>
          <p>节点状态: {{item.state}}</p>
          <p v-if="item.auditorNote !== null">备注原因: {{item.auditorNote}}</p>
          <p v-if="item.nextOperatorName !== null">下一审核人: {{item.nextOperatorName}}</p>
        </div>
      </el-step>
    </el-steps>
  </s-dialog>
</template>

<script>
  import {AutoVue} from '~/plugins/Tools';
  export default AutoVue({
    data: {
      dialogSearch: {
        step: [],
        formRef: false,
        width: '360px',
      },
    },
    methods: {
      async open (row) {
        let {contentList} = await this.get('/reimbursement/trajectory/' + row.id);
        let step = [];
        contentList.forEach(item => {
          item.operatorTime = this.formatterTime(item.operatorTime, 6);
          step.push(item);
        });
        this.dialogSearch.step = step.reverse();
        this.dialogSearch.visible = true;
      },
    },
  });
</script>
